package com.kalaqia.picker.sample;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.Toast;

import com.kalaqia.picker.time.TimeRangePickerDialog;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        findViewById(R.id.id_btn1).setOnClickListener(view -> {

            TimeRangePickerDialog dialog = new TimeRangePickerDialog();
            dialog.setOnConfirmListener((startTime, endTime) -> {
                Toast.makeText(MainActivity.this, startTime + "--" + endTime, Toast.LENGTH_SHORT).show();
            });
            dialog.show(getSupportFragmentManager());

        });
    }

}
